<!doctype html>
<html lang="zh">
<head>

    <meta charset="utf-8">

    <title>思途CMS{$coreVersion}</title>

    {template 'stourtravel/public/public_min_js'}

    {php echo Common::getCss('base_new.css'); }

    <style>

        .up-img-area {

            width: 60px;

            height: 60px;

        }

    </style>

</head>

<body style=" overflow: hidden">

<div class="s-main">
    <ul class="info-item-block">
        <li>
            <span class="item-hd">显示端：</span>
            <div class="item-bd">
                {loop $client $k=>$cv}
                <label class="radio-label w100"><input type="checkbox" data-name="{$cv}" {if in_array($k, $info['client_arr'])}checked{/if} name="client" value="{$k}">{$cv}</label>
                {/loop}
            </div>
        </li>
    </ul>
    <div class="clearfix text-c">
        <a href="javascript:;" class="btn btn-default radius c-999 mr-10 refuse" id="refuse-btn">取消</a>
        <a href="javascript:;" class="btn btn-primary radius" id="confirm-btn">确定</a>
    </div>
</div>
<script type="text/javascript">
    $(function () {
        // 保存数据
        $(document).on('click', '#confirm-btn', function () {
            var list = $("input[name='client']:checked");
            var id = [];
            var str = [];
            list.each(function (index, item){
                var val = $(item).val();
                var title = $(item).attr('data-name');
                id.push(val);
                str.push(title);
            })
            var data = {
                id: {$info['id']},
                m_client: id.join(','),
                m_client_str: str.join('、'),
            }
            ST.Util.responseDialog(data, true);
        });
    });
</script>
</body>
</html>